set buildConfig=Debug

del .\Packages\*.* /s /f /q 
rmdir .\Packages /s /q
msbuild ..\Source\Azure\DeployNode\CloudBlitz.DeployNode\CloudBlitz.DeployNode.ccproj /property:Configuration=%buildConfig% /target:publish
msbuild ..\Source\Azure\ClusterTemplate\CloudBlitz.ClusterTemplate\CloudBlitz.ClusterTemplate.ccproj /property:Configuration=%buildConfig% /target:publish
msbuild ..\Source\Powershell\CloudBlitz.Powershell\CloudBlitz.Powershell.csproj /property:Configuration=%buildConfig% 

mkdir .\Packages\CloudBlitz.DeployNode
xcopy ..\Source\Azure\DeployNode\CloudBlitz.DeployNode\bin\%buildConfig%\app.publish\*.* .\Packages\CloudBlitz.DeployNode /r /y /e
mkdir .\Packages\CloudBlitz.ClusterTemplate
xcopy ..\Source\Azure\ClusterTemplate\CloudBlitz.ClusterTemplate\bin\%buildConfig%\app.publish\*.* .\Packages\CloudBlitz.ClusterTemplate /r /y /e
mkdir .\Packages\CloudBlitz.ClusterTemplate
xcopy ..\Source\Azure\ClusterTemplate\CloudBlitz.ClusterTemplate\ServiceDefinition.csdef .\Packages\CloudBlitz.ClusterTemplate /r /y
mkdir .\Packages\CloudBlitz.Powershell
mkdir .\Packages\CloudBlitz.Powershell\Plugin
xcopy ..\Source\Powershell\CloudBlitz.Powershell\bin\%buildConfig%\*.* .\Packages\CloudBlitz.Powershell\Plugin /r /y /e
mkdir .\Packages\CloudBlitz.Powershell\Scripts
xcopy ..\Source\Powershell\Scripts\*.* .\Packages\CloudBlitz.Powershell\Scripts /r /y /e
